{% extends "base.html" %}
{% load pp_url %}
{% load topictags %}
{% block title %}
{% if request.object %}{{ request.object.text }}{% endif %} Topics
{% endblock title %}

{% block content %}
{% pp_get_topic_list topic=request.object %}
    {% if pp_topic.topic_list %}
    <h2>Topics</h2>
  <ol>
    {% for topic in pp_topic.topic_list %}
    
	  <li> <a href="{% pp_url template="topics.html" object=topic %}">{{ topic.text }}</a> </li>
		   
	{% endfor %}

  </ol>
{% endif %}
  
{% endpp_get_topic_list %}
{% pp_topic_form POST=request.POST path=request.path root=request.object %}
<h2> Create a new topic </h2>
  <form method="post" action="">
    {{ pp_topic.form.as_p }}
    {% csrf_token %}
    <input type="submit" value="Submit">
  </form>
{% endpp_topic_form %}

{% endblock %}
